package com.hzsxy.bighomework.entity;


import javax.persistence.*;

/**
 * Created by 张晨 on 2018/11/28
 */
@Entity
@Table(name = "class_info")
public class ClassInfoDO {
    @Id
    @Column(name = "class_id",length = 20,nullable = false)
    private String classId;
    @Column(name = "class_name",length = 20,nullable = false)
    private String className;
    @Column(name = "max",nullable = false)
    private int max;
    @Column(name = "total",nullable = false)
    private int total;
    @ManyToOne(cascade = {CascadeType.ALL},fetch = FetchType.EAGER)
    @JoinColumn(name = "teacher_id",nullable = false)
    private Teacher teacherIdFK;

    public String getClassId() {
        return classId;
    }

    public void setClassId(String classId) {
        this.classId = classId;
    }

    public String getClassName() {
        return className;
    }

    public void setClassName(String className) {
        this.className = className;
    }

    public Teacher getTeacherIdFK() {
        return teacherIdFK;
    }

    public int getMax() {
        return max;
    }

    public void setMax(int max) {
        this.max = max;
    }

    public int getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }

    public void setTeacherIdFK(Teacher teacherIdFK) {
        this.teacherIdFK = teacherIdFK;
    }

    public ClassInfoDO() {
    }
}
